gtkplacesview: don't rely on widgets on headers
authorCarlos Soriano <csoriano@gnome.org>
Sat, 29 Aug 2015 18:36:48 +0000 (20:36 +0200)
committerCarlos Soriano <csoriano@gnome.org>
Sun, 30 Aug 2015 07:47:28 +0000 (09:47 +0200)
commit03cd8e95584e64b28e56fa2ea4bc7f27c786deed
treee8eae59a3f9df10d4333e32b56de20ff2ef262cd
parentbdb17a089066fbd8af47b74c28c4df07f6980377
gtkplacesview: don't rely on widgets on headers

We are showing a GtkSpinner on the networks header to provide feedback
to the user if we are fetching networks, therefore we have to modify
the spinner state when doing it.
However GtkListBox doesn't give guarantees about the widgets
set by gtk_list_box_set_header, and we could access an invalid
widget.

To avoid to access invalid widgets, bind the fetching networks
view property to the networks header spinner active property instead
of modifying directly the spinner in the private structure.

Not having the spinner in the private structure also makes the code
cleaner.

https://bugzilla.gnome.org/show_bug.cgi?id=754150
gtk/gtkplacesview.c